import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import autoImportPlugin from '@opentiny/unplugin-tiny-vue'

export default defineConfig({
	plugins: [
		vue(),
		autoImportPlugin('vite')
	],
	define: {
		'process.env': { ...process.env }
	},
	server: {
		host: '0.0.0.0',
		port: 5052
	},
	resolve: {
		alias: {
			'@': fileURLToPath(new URL('./src', import.meta.url))
		},
	},
})
